{% if site.gitalk and site.gitalk.enable == true %}
<section class="comments" id="comments">
<div id="gitalk-container"></div>
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
<script src="/assets/js/md5.min.js"></script>
<script type="text/javascript">
  var gitalk = new Gitalk({
    clientID: "{{ site.gitalk.client_id }}",
    clientSecret: "{{ site.gitalk.client_secret }}",
    repo: "{{ site.gitalk.repo }}",
    owner: "{{ site.gitalk.owner }}",
    admin: ["{{ site.gitalk.admin }}"],
    id: md5(location.pathname),
    distractionFreeMode: "{{ site.gitalk.distractionFreeMode }}"
  });
  gitalk.render('gitalk-container');
</script>
<noscript> 为正常使用评论功能请激活JavaScript</noscript>
</section>
{% endif %}
